package com.qqt.csr.workbench.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 技能组
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName(value = "csr_skill_set")
public class SkillSet implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 上级
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 排序值
     */
    @TableField(value = "sort_num")
    private Integer sortNum;

    /**
     * 层级
     */
    @TableField(value = "level")
    private Integer level;

    /**
     * 是否移除：0 否；1 是
     */
    @TableField(value = "delete_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 子级
     */
    @TableField(exist = false)
    private List<SkillSet> childList;

    private static final long serialVersionUID = 1L;
}